#ifndef _msg_queue_h
#define _msg_queue_h

#include <stdint.h>
#include <stdbool.h>


#define MSG_AT         0x01
#define MSG_TIMER      0x02




#define GSM_STATE_REPORT     0x01
#define GPRS_STATE_REPORT    0x02
#define SIM_STATE            0x03
#define CALL_READY           0x04

#define SEND_OK              0x10

#define OTHER                0xff



#define REPORT               0x01


typedef struct{
	uint16_t type;
	uint16_t id;
	uint32_t value;
	uint32_t param;
}Msg;


typedef struct {
	Msg* msgArray;
	uint16_t inCursor;
	uint16_t outCursor;
	uint16_t msgArraySize;
	uint16_t msgCounter;
}MsgQueue;



void CreateMessageQueue(MsgQueue* pQueue, Msg* array, uint16_t arraySize);
bool PostMessage(MsgQueue* pMsgQueue, uint16_t type, uint16_t id, uint32_t val, uint32_t param);
bool PeekMessage(MsgQueue* pMsgQueue, Msg* pMsg);





#endif
